<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us"> 
<body>
<PRE>
#include &lt;iostream&gt;
#include &lt;cmath&gt;
#include &lt;vector&gt;
#include &lt;string&gt;
#include &lt;algorithm&gt;
#include "lwave.h"


using namespace std;

int main()
{

        string name="db3";
        int J=2;
        double lp1_a[] = {0.9501,0.2311,0.6068,0.4860,0.8913,0.7621,0.4565,0.0185,0.8214,
                0.4447,0.6154,0.7919,0.9218,0.7382,0.1763,0.4057};
        /*double lp1_a[] = {1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,
         * 1.000,1.000,1.000,1.000,1.000,1.000,1.000};*/
        vector&lt;double&gt; sig;
            sig.assign(lp1_a,lp1_a + sizeof(lp1_a)/sizeof(double));

            liftscheme blift(name);
            string c="d";
            vector&lt;double&gt; addl;
            addl.push_back(0.500);
            addl.push_back(-0.125);

            int mp=0;
            blift.addLift(c,addl,mp);
            blift.disp();

            lwt&lt;double&gt; dlift(sig,blift,J);
            vector&lt;double&gt; a,d;
            vector&lt;int&gt; lengths;
            dlift.getCoeff(a,d);
            dlift.getDetailVec(lengths);
            cout << " Approximation : " << endl;
            for (int i=0; i < a.size();i++) {
                    cout << a[i] << " ";
            }
            cout << endl;

            cout << " Detail : " << endl;
            for (int i=0; i < d.size();i++) {
                    cout << d[i] << " ";
            }
            cout << endl;

            cout << " Lengths Of Detail Vectors : " << endl;
            for (int i=0; i < lengths.size();i++) {
                    cout << lengths[i] << " ";
            }
            cout << endl;


            ilwt&lt;double&gt; idlift(dlift,blift);
            vector&lt;double&gt; oup;
            idlift.getSignal(oup);

            cout << " Reconstructed : " << endl;
            for (int i=0; i < oup.size();i++) {
                    cout << oup[i] << " ";
            }
            cout << endl;


            return 0;
}



</PRE>
</body>
</html>